﻿using FreeSql.DataAnnotations;
using System;

namespace Colorful.Furniture.PermissionManagement;

/// <summary>
///  数据权限
/// </summary>
[Table(Name = "sys_data_permission")]
public class SysDataPermission
{
    /// <summary>
    ///  id
    /// </summary>
    [Column(Name = "id", IsPrimary = true)]
    public Guid Id { get; set; }

    /// <summary>
    ///  角色编码
    /// </summary>
    [Column(Name = "role_id")]
    public Guid? RoleId { get; set; }

    /// <summary>
    ///  管理员编码
    /// </summary>
    [Column(Name = "manager_id")]
    public Guid? ManagerId { get; set; }

    /// <summary>
    ///  权限类型 0 不限，1 当前用户，2 当前部门，3 当前部门所有下级，4 跨部门 5 跨部门所有下级
    /// </summary>
    [Column(Name = "permission_type", StringLength = 4000)]
    public string PermissionType { get; set; }

    /// <summary>
    ///  跨级部门id Department表的DepartId属性
    /// </summary>
    [Column(Name = "cross_level_depart", StringLength = 4000)]
    public string CrossLevelDepart { get; set; }
}